#include "mainwindow.h"
#include <QApplication>
#include <QTextCodec>
#include <QDebug>
#include <QFontDatabase>

int main(int argc, char *argv[])
{
//    QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));
    QApplication a(argc, argv);
//    int id = QFontDatabase::addApplicationFont("/usr/lib/fonts/DroidSansFallback.ttf");
    int id = QFontDatabase::addApplicationFont("/usr/share/fonts/DroidSansFallback.ttf");
    QString msyh = QFontDatabase::applicationFontFamilies (id).at(0);
    QFont font(msyh,10);
    qDebug()<<msyh<<endl;
    font.setPointSize(10);
//    app.setFont(font);
    a.setFont(font);
    MainWindow w;
//    w.setWindowTitle (QString::fromUtf8("我是中文"));
    w.show();

    return a.exec();
}
